package net.yunzhanyi.generic.mapper;

import net.yunzhanyi.generic.domain.model.Author;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author bestct
 */

@Mapper
public interface AuthorMapper {

    Author selectByPrimaryKey(Long id);

    List<Long> selectAllId();

    void updateRecordCount(@Param("id") Long id, @Param("count") Integer count);

    List<Author> selectByKeyword(@Param("keyword") String keyword);

    List<Author> selectAuthor();
    void updateDynastyId(@Param("id") Long id, @Param("dynastyId") Integer dynastyId);

    List<Author> selectAllAuthor(@Param("dynasty") Integer dynasty);


    String selectAuthorNameById(@Param("authorId") Long authorId);

    Integer selectCount();

    List<Author> selectAuthorSimple(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    Author selectByName(String name);
}
